package com.cn.common.consumer;

import io.netty.channel.Channel;

public class ClientChannelInfo {

    private String clientId;
    private Channel channel;
    private long lastUpdateTime = System.currentTimeMillis();

    public ClientChannelInfo() {
    }

    public ClientChannelInfo(String clientId, Channel channel, long lastUpdateTime) {
        this.clientId = clientId;
        this.channel = channel;
        this.lastUpdateTime = lastUpdateTime;
    }

    public String getClientId() {
        return clientId;
    }

    public ClientChannelInfo setClientId(String clientId) {
        this.clientId = clientId;
        return this;
    }

    public Channel getChannel() {
        return channel;
    }

    public ClientChannelInfo setChannel(Channel channel) {
        this.channel = channel;
        return this;
    }

    public long getLastUpdateTime() {
        return lastUpdateTime;
    }

    public ClientChannelInfo setLastUpdateTime(long lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
        return this;
    }

    @Override
    public String toString() {
        return "ClientChannelInfo{" +
                "clientId='" + clientId + '\'' +
                ", channel=" + channel +
                ", lastUpdateTime=" + lastUpdateTime +
                '}';
    }
}
